package com.itheima.reggie.mapper;

import com.itheima.reggie.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

public interface SetmealDishMapper {

    /*
    * 批量插入套餐菜品列表数据
    * */
    Integer save(@Param("setmealDishList") List<SetmealDish> setmealDishList);


    /*
    *删除指定多个套餐id的套餐菜品关系数据(伪删除)
    * */
    Integer deleteBySetmealIds(@Param("ids") List<Long> ids,
                               @Param("updateUser") Long updateUser,
                               @Param("updateTime") LocalDateTime updateTime);




    @Delete("delete from setmeal_dish where setmeal_id=#{setmealId}")
    void deleteBySetmealId(Long id);
}
